package com.fandy.struts.DAL;

 
import java.sql.ResultSet;
import java.sql.SQLException;

import com.fandy.struts.SqlAccess.SqlServerHelper;
import com.fandy.struts.SqlStatement.Entry;


public class DALEntry {
 
	Entry  e = new Entry();
	
 SqlServerHelper ssh = new SqlServerHelper();

 
	public   ResultSet  getAll()
	{
		return    ssh.executeScalar(e.getAll());
	}
	
	public   ResultSet getEntryInfoByID(int ID)
	{
		return  ssh.executeScalar(e.getEntryInfoByID(ID));
	}
	
	
	public   ResultSet  existEntry(com.fandy.struts.Model.Entry ety)
	{
		return   ssh.executeScalar(e.existEntry(ety));
	
	}
	
	public int UpdateByID(int id,com.fandy.struts.Model.Entry ety) throws SQLException
	{
		
		return  ssh.executeNoQuery(e.UpdateByID(id, ety));
	}
	
	public int DeleteByID(int id) throws SQLException
	{
		
		return ssh.executeNoQuery(e.DeleteByID(id));
		
	}
	
	
	
}

